package com.heima.es.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.util.Date;

/**
 * 存入
 */
@Data
public class SearchArticleVo {

    // 文章id
    private Long id;
    // 文章标题
    private String title;
    // 文章发布时间
    private Date publishTime;
    // 文章布局
    private Integer layout;
    // 封面
    private String images;
    // 作者id
    private Long authorId;
    // 作者名词
    private String authorName;
    //静态url
    private String staticUrl;
    //文章内容
    private String content;

    //文章建议词
    @TableField(exist = false)
    private String suggestion;

    public SearchArticleVo() {
        this.suggestion = this.title;
    }

    public SearchArticleVo(Long id, String title, Date publishTime, Integer layout, String images, Long authorId, String authorName, String staticUrl, String content) {
        this.id = id;
        this.title = title;
        this.publishTime = publishTime;
        this.layout = layout;
        this.images = images;
        this.authorId = authorId;
        this.authorName = authorName;
        this.staticUrl = staticUrl;
        this.content = content;
        this.suggestion = title;
    }
}